package com.ruoyi.gcgl.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.gcgl.mapper.GysptWarehouseEntryitemMapper;
import com.ruoyi.gcgl.domain.GysptWarehouseEntryitem;
import com.ruoyi.gcgl.service.IGysptWarehouseEntryitemService;
import com.ruoyi.common.core.text.Convert;

/**
 * 入库单项Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-01
 */
@Service
public class GysptWarehouseEntryitemServiceImpl implements IGysptWarehouseEntryitemService 
{
    @Autowired
    private GysptWarehouseEntryitemMapper gysptWarehouseEntryitemMapper;

    /**
     * 查询入库单项
     * 
     * @param id 入库单项主键
     * @return 入库单项
     */
    @Override
    public GysptWarehouseEntryitem selectGysptWarehouseEntryitemById(Long id)
    {
        return gysptWarehouseEntryitemMapper.selectGysptWarehouseEntryitemById(id);
    }

    /**
     * 查询入库单项列表
     * 
     * @param gysptWarehouseEntryitem 入库单项
     * @return 入库单项
     */
    @Override
    public List<GysptWarehouseEntryitem> selectGysptWarehouseEntryitemList(GysptWarehouseEntryitem gysptWarehouseEntryitem)
    {
        return gysptWarehouseEntryitemMapper.selectGysptWarehouseEntryitemList(gysptWarehouseEntryitem);
    }

    /**
     * 新增入库单项
     * 
     * @param gysptWarehouseEntryitem 入库单项
     * @return 结果
     */
    @Override
    public int insertGysptWarehouseEntryitem(GysptWarehouseEntryitem gysptWarehouseEntryitem)
    {
        return gysptWarehouseEntryitemMapper.insertGysptWarehouseEntryitem(gysptWarehouseEntryitem);
    }

    /**
     * 修改入库单项
     * 
     * @param gysptWarehouseEntryitem 入库单项
     * @return 结果
     */
    @Override
    public int updateGysptWarehouseEntryitem(GysptWarehouseEntryitem gysptWarehouseEntryitem)
    {
        return gysptWarehouseEntryitemMapper.updateGysptWarehouseEntryitem(gysptWarehouseEntryitem);
    }

    /**
     * 批量删除入库单项
     * 
     * @param ids 需要删除的入库单项主键
     * @return 结果
     */
    @Override
    public int deleteGysptWarehouseEntryitemByIds(String ids)
    {
        return gysptWarehouseEntryitemMapper.deleteGysptWarehouseEntryitemByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除入库单项信息
     * 
     * @param id 入库单项主键
     * @return 结果
     */
    @Override
    public int deleteGysptWarehouseEntryitemById(Long id)
    {
        return gysptWarehouseEntryitemMapper.deleteGysptWarehouseEntryitemById(id);
    }
}
